package org.example.struct.array2;

/**
 * @author liyishan
 * @date 2024/3/25 11:32
 * @apiNote
 */

public class Test00518Change {
    public int change(int amount, int[] coins) {
        int[] dp = new int[amount + 1];
        dp[0] =1;
        for(int coin: coins){
            for(int i = coin;i<=amount;i++){
                dp[i] += dp[i-coin];
            }
        }
        return dp[amount];
    }
}
